<div>Exportar a:
<?php echo $form->button('PDF',array('onClick'=>'exportarPdf()'));
	echo $form->create('Articulo',array('id'=>'mostrarPdf','url'=>array('controller'=>'kardexes','action'=>'getPdf')));
	echo $form->hidden('id',array('type'=>'text','value'=>$data['Articulo']['id']));
	echo $form->hidden('descripcion',array('type'=>'text','value'=>$data['Articulo']['descripcion']));
	echo $form->hidden('almacen_id',array('type'=>'text','value'=>$data['Articulo']['almacen_id']));
	echo $form->hidden('fecha_de',array('value'=>$data['Articulo']['fecha_de']));
	echo $form->hidden('fecha_a',array('value'=>$data['Articulo']['fecha_a']));
	echo $form->end();
?>
</div>
<div>
	<div class="append-3"><div class="ui-state-default ui-th-ltr text_right ui-jqgrid-htable">Stock Anterior:&nbsp;<?php echo number_format($stockAnterior,2,'.',''); ?>&nbsp;&nbsp;&nbsp;&nbsp;</div></div>
	<table id="table_kardex">
		<thead>
			<tr>
				<th>Nro</th>
				<th>Numero Documento</th>
				<th>Tipo Documento</th>
				<th>Fecha Emision</th>
				<th>Ingreso</th>
				<th>Salida</th>
				<th>Stock</th>
				<th>Ver Doc</th>
			</tr>
		</thead>
		<tbody><?php
			foreach($kardexes as $key=>$kardex){ $nro = $key+1; echo 
			'<tr>'
				.'<td class="text_right">'.$nro.'</td>'
				.'<td class="text_right">'.$kardex['Documento']['numero'].'</td>'
				.'<td>'.$kardex['Documento']['descripcion'].'</td>'
				.'<td>'.$kardex['Documento']['fecha'].'</td>'
				.'<td class="text_right">'.$kardex['Documento']['ingreso'].'</td>'
				.'<td class="text_right">'.$kardex['Documento']['salida'].'</td>'
				.'<td class="text_right">';
					if(empty($this->data['Articulo']['almacen_id'])) echo $kardex['Documento']['articulo_stock'];
					else echo $kardex['Documento']['almacen_stock'];
				echo '</td>'
				.'<td>';
					$url = $html->url(array('controller'=>'documentos','action'=>'view', $kardex['Documento']['modelo'], $kardex['Documento']['id']));
					echo $html->image('mostrar.png', array('title'=>__('ver',true), "alt" => "mostrar", 'onclick' => "verDocumento('".$url."')"));	
				echo '</td>'
			.'</tr>';
		
		} ?>
		</tbody>
	</table>
</div>
<div class="clear"></div>